function smFlashObject()
{
	this.majorVer=0;
	this.minorVer=0;
	this.revision=0;
	this.beta=0;
	this.tgtMajorVer=1;
	this.tgtMinorVer=0;
	this.tgtRevision=0;
	this.altHtml="Please download the latest version of the free <a href=\"http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" target=\"_blank\">Flash Player</a>";
	this.w=200;
	this.h=200;
	this.param={};
	this.param.allowScriptAccess="sameDomain";
	this.param.quality="high";
	this.param.menu="false";
	this.verChk();
}

smFlashObject.prototype.verChk=function()
{
	var np=navigator.plugins,nm=navigator.mimeTypes,mt="application/x-shockwave-flash";
	var p = "";
	if(nm&&nm[mt]&&nm[mt].enabledPlugin)
	{
		for(var i=0;i<np.length;i++)
		{
			p=np[i].description;
			if(p.indexOf("Flash")>=0)
			{
				p=p.split(" ").join("").replace("ShockwaveFlash","");
				if(p.indexOf("r")>=0)
				{
					p=String(p.replace("r",".")+".0").split(".");
				}
				else
				{
					if(p.indexOf("b")>=0)
					{
						p=p.replace("b",".0.").split(".");
					}
				}
				break;
			}
		}
	}
	else
	{
		if(window.ActiveXObject)
		{
			try
			{
				var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
				p=f.GetVariable("$version").split(" ")[1].split(",");
			}
			catch(e)
			{}
		}
	}

	with(this)
	{
		majorVer=Number(p[0]);
		minorVer=Number(p[1]);
		revision=Number(p[2]);
		beta=Number(p[3]);
	}
};

smFlashObject.prototype.flaHtml=function()
{
	if(!this.src)
	{
		return false;
	}
	
	if(!this.id)
	{
		this.id=this.src.substring(0,this.src.indexOf("."));
	}
	
	var T="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\""+this.w+"\" height=\""+this.h+"\" id=\""+this.id+"\" align=\"middle\">";
	
	var i="<embed width=\""+this.w+"\" height=\""+this.h+"\" name=\""+this.id+"\" align=\"middle\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"";

	T+=this.objParam("movie",this.src);
	i+=this.embParam("src",this.src);
	for(var z in this.param)
	{
		T+=this.objParam(z,this.param[z]);
		i+=this.embParam(z,this.param[z]);
	}
	
	T+=i+" /></object>";
	return T;
};

smFlashObject.prototype.objParam=function(z,i)
{
	return "<param name=\""+z+"\" value=\""+i+"\" />";
};

smFlashObject.prototype.embParam=function(z,i)
{
	return " "+z+"=\""+i+"\"";
};

smFlashObject.prototype.enable=function()
{
	var z=this.majorVer*10000+this.minorVer*1000+this.revision;
	var i=this.tgtMajorVer*10000+this.tgtMinorVer*1000+this.tgtRevision;
	return (z>=i);
};

smFlashObject.prototype.flaWrite=function()
{
	return this.flaHtml();
};
smFlashObject.prototype.altWrite=function()
{
	return (this.altHtml);
};
smFlashObject.prototype.write=function()
{
	if(this.enable())
	{
		this.flaWrite();
	}
	else
	{
		this.altWrite();
	}
};


smFlashObject.prototype.getHtml=function()
{
	if(this.enable())
	{
		return this.flaHtml();
	}
	else
	{
		return this.altHtml;
	}
};
